{include file="public_head" /}

<!-- datatables -->
<link href="__STATIC__/js/datatables/jquery.dataTables.min.css" rel="stylesheet" type="text/css"/>
<!-- Select2 -->
<link href="__STATIC__/css/select/select2.min.css" rel="stylesheet">

<link href="__STATIC__/css/preview.css" rel="stylesheet">

<!-- chk_3 -->
<link href="__STATIC__/css/chk_3.css" rel="stylesheet" type="text/css"/>

<body class="nav-md">

<div class="container body">


    <div class="main_container">

        {include file="public_sidebar,public_nav" /}


        <!-- page content -->
        <div class="right_col" role="main">
            <div class="">
                <div class="page-title">
                    <div class="title_left">
                        <h3>
                            商品管理
                        </h3>
                    </div>
                </div>
                <div class="clearfix"></div>

                <div class="row">

                    <div class="col-md-12 col-sm-12 col-xs-12">
                        <div class="x_panel">
                            <div class="x_title">
                                <h2>{$mate_title}</h2>
                                <div class="clearfix"></div>
                            </div>
                            <div class="x_content">
                                <form name="form" id="form" method="get" action="">
                                    <table class="table table-striped table-bordered">
                                        <thead>
                                        <tr>
                                            <th style="width: 30%;">标题</th>
                                            <th style="width: 10%;">缩略图</th>
                                            <th style="width: 10%;">点击数</th>
                                            <th style="width: 10%;">销量</th>
                                            <th style="width: 10%;">点击转化率</th>
                                            <!--<th>条形图</th>-->
                                        </tr>
                                        </thead>

                                        <tbody>
                                        {empty name="data"}
                                        <tr><td colspan="10"><div style='font-size:24px;margin:30px 0;'>没有找到记录</div></td></tr>
                                        {/empty}
                                        {volist name="data" id="item"}
                                        <tr>
                                            <td>{$item.title}</td>
                                            <td align="center">
                                                <a path="__PUBLIC__/{$item.thumb_img}" class="preview">
                                                    <img id="imgShow" src="__PUBLIC__/{$item.thumb_img|default=''}" height="65" onerror="this.src='__STATIC__/images/add_img.png'"/>
                                                </a>
                                            </td>
                                            <td>{$item.hits}</td>
                                            <td>{$item.sale_number}</td>
                                            <td>{$item.precent}%</td>
                                            <!--<td>-->

                                            <!--</td>-->
                                        </tr>
                                        {/volist}
                                        </tbody>
                                        <!--<tbody align="left">-->
                                        <!--<tr>-->
                                            <!--<td colspan="10">-->
                                                <!--<span>控制：</span>-->
                                                <!--<a style="color:#428BCA"-->
                                                   <!--href="javascript:UpOrderID('{:url(\'ShopGoods/sorting\')}');">更新排序</a>-->
                                            <!--</td>-->
                                        <!--</tr>-->
                                        <!--</tbody>-->
                                    </table>
                                    <!-- 分页 -->
                                    <div style="float: right;margin-top: -30px;">{$data->render()}</div>
                                </form>
                            </div>
                        </div>
                    </div>

                </div>
            </div>

        </div>
        <!-- /page content -->
    </div>

</div>

{include file="public_foot" /}
<!--select-->
<script src="__STATIC__/js/select/select2.full.min.js"></script>
<!-- public -->
<script src="__STATIC__/js/public.js"></script>

<script src="__STATIC__/js/preview.js"></script>
<!-- layer -->
<script src="__STATIC__/js/layer.js"></script>
<script type="text/javascript">
    $(function () {
        // preview
        if ($('a.preview').length) {
            var img = preloadIm();
            imagePreview(img);
        }

    });

    // list
    $(document).ready(function () {
        // select2
        $(".select2_single").select2({
            placeholder: "请选择分类",
            allowClear: true
        });
        $(".select2-container").css({width:"80%"})
        $(".form-group:first-of-type .select2-container").css({width:"96%"})
    });
</script>